﻿package mortal.game.view.palyer.util
{
    import Message.Client.*;
    import Message.DB.Tables.*;
    import Message.Game.*;
    import Message.Public.*;
    import com.gengine.utils.*;
    import extend.language.*;
    import flash.display.*;
    import flash.utils.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.common.swfPlayer.*;
    import mortal.common.swfPlayer.data.*;
    import mortal.component.gconst.*;
    import mortal.game.cache.*;
    import mortal.game.manager.*;
    import mortal.game.manager.msgTip.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.resource.info.item.*;
    import mortal.game.resource.tableConfig.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.util.*;
    import mortal.game.view.palyer.data.*;
    import mortal.game.view.skill.*;
    import mortal.game.view.systemSetting.*;
    import mortal.game.view.wardrobe.data.*;

    public class FashionUtil extends Object
    {
        public static var attrs:Array = ["attack", "life", "physDefense", "magicDefense", "penetration", "jouk", "hit", "crit", "toughness", "block", "expertise"];

        public function FashionUtil()
        {
            return;
        }// end function

        public static function getSuitAttrData(param1:String) : Array
        {
            var _loc_4:String = null;
            var _loc_5:SuitAttrData = null;
            var _loc_2:Array = [];
            var _loc_3:* = param1.split("&");
            for each (_loc_4 in _loc_3)
            {
                
                _loc_5 = new SuitAttrData();
                _loc_5.attrType = int(_loc_4.split("#")[1]);
                _loc_5.attrName = GameDefConfig.instance.getItem("FightRoleAttribute", _loc_5.attrType).text1;
                _loc_5.attrValue = int(_loc_4.split("#")[2]);
                _loc_2.push(_loc_5);
            }
            return _loc_2;
        }// end function

        public static function getSuitCombat(param1:SuitInfoData) : int
        {
            var _loc_2:int = 0;
            var _loc_3:ItemData = null;
            var _loc_4:Object = null;
            var _loc_5:TSuit = null;
            var _loc_6:ItemData = null;
            var _loc_7:String = null;
            var _loc_8:Array = null;
            var _loc_9:String = null;
            var _loc_10:String = null;
            if (param1.ownFashionNum > 0)
            {
                for each (_loc_4 in param1.fashionDic)
                {
                    
                    if (_loc_4["isCollected"] && !_loc_4["isExpired"])
                    {
                        _loc_6 = _loc_4["fashion"] as ItemData;
                        if (!_loc_3)
                        {
                            _loc_3 = new ItemData(_loc_6.itemCode, true);
                            continue;
                        }
                        for each (_loc_7 in AttributeUtil.attrs)
                        {
                            
                            _loc_3.itemInfo[_loc_7] = _loc_3.itemInfo[_loc_7] + _loc_6.itemInfo[_loc_7];
                        }
                    }
                }
                _loc_5 = ItemConfig.instance.getSuitById(param1.suitId);
                if (_loc_5)
                {
                    _loc_8 = getSuitAttrData(_loc_5.attribute);
                    if (param1.ownFashionNum >= 2 && param1.ownFashionNum < 4)
                    {
                        _loc_7 = AttributeUtil.transferSpecialAttr(GameDefConfig.instance.getItem("FightRoleAttribute", _loc_8[0].attrType).text);
                        _loc_3.itemInfo[_loc_7] = _loc_3.itemInfo[_loc_7] + _loc_8[0].attrValue;
                    }
                    else if (param1.ownFashionNum == 4)
                    {
                        _loc_9 = AttributeUtil.transferSpecialAttr(GameDefConfig.instance.getItem("FightRoleAttribute", _loc_8[0].attrType).text);
                        _loc_10 = AttributeUtil.transferSpecialAttr(GameDefConfig.instance.getItem("FightRoleAttribute", _loc_8[1].attrType).text);
                        _loc_3.itemInfo[_loc_9] = _loc_3.itemInfo[_loc_9] + _loc_8[0].attrValue;
                        _loc_3.itemInfo[_loc_10] = _loc_3.itemInfo[_loc_10] + _loc_8[1].attrValue;
                    }
                }
            }
            _loc_2 = _loc_3 == null ? (0) : (EquipmentUtil.getEquipCombat(_loc_3));
            return _loc_2;
        }// end function

        public static function getSuitCombat2(param1:SuitInfoData) : int
        {
            var _loc_2:int = 0;
            var _loc_3:ItemData = null;
            var _loc_4:Object = null;
            var _loc_5:TSuit = null;
            var _loc_6:ItemData = null;
            var _loc_7:String = null;
            var _loc_8:Array = null;
            var _loc_9:String = null;
            var _loc_10:String = null;
            for each (_loc_4 in param1.fashionDic)
            {
                
                _loc_6 = _loc_4["fashion"] as ItemData;
                if (!_loc_3)
                {
                    _loc_3 = new ItemData(_loc_6.itemCode, true);
                    continue;
                }
                for each (_loc_7 in AttributeUtil.attrs)
                {
                    
                    _loc_3.itemInfo[_loc_7] = _loc_3.itemInfo[_loc_7] + _loc_6.itemInfo[_loc_7];
                }
            }
            _loc_5 = ItemConfig.instance.getSuitById(param1.suitId);
            if (_loc_5)
            {
                _loc_8 = getSuitAttrData(_loc_5.attribute);
                _loc_9 = AttributeUtil.transferSpecialAttr(GameDefConfig.instance.getItem("FightRoleAttribute", _loc_8[0].attrType).text);
                _loc_10 = AttributeUtil.transferSpecialAttr(GameDefConfig.instance.getItem("FightRoleAttribute", _loc_8[1].attrType).text);
                _loc_3.itemInfo[_loc_9] = _loc_3.itemInfo[_loc_9] + _loc_8[0].attrValue;
                _loc_3.itemInfo[_loc_10] = _loc_3.itemInfo[_loc_10] + _loc_8[1].attrValue;
            }
            _loc_2 = _loc_3 == null ? (0) : (EquipmentUtil.getEquipCombat(_loc_3));
            return _loc_2;
        }// end function

        public static function saveWholeImage() : void
        {
            var _loc_4:String = null;
            var _loc_6:ItemData = null;
            var _loc_7:Object = null;
            var _loc_8:ItemData = null;
            var _loc_9:ItemData = null;
            var _loc_10:ItemData = null;
            var _loc_11:Boolean = false;
            var _loc_12:Object = null;
            var _loc_13:String = null;
            var _loc_1:* = Cache.instance.wardrobe.appearModelCurrFashionDic;
            var _loc_2:Boolean = true;
            var _loc_3:Boolean = true;
            var _loc_5:Array = [];
            for each (_loc_6 in _loc_1)
            {
                
                _loc_8 = Cache.instance.pack.packRolePackCache.getEquipByType(_loc_6.itemInfo.type);
                if (_loc_6 && _loc_8 && _loc_6.itemCode != _loc_8.itemCode)
                {
                    _loc_2 = false;
                }
                else if (!_loc_6 && _loc_8 || _loc_6 && !_loc_8)
                {
                    _loc_2 = false;
                }
                if (_loc_6)
                {
                    _loc_9 = Cache.instance.pack.wardrobePackCache.getItemByCode(_loc_6.itemInfo.code);
                    _loc_10 = Cache.instance.pack.packRolePackCache.getEquipByType(_loc_6.itemInfo.type);
                    _loc_11 = Cache.instance.pack.packRolePackCache.getItemByCode(_loc_6.itemInfo.code) == null ? (false) : (true);
                    if (!_loc_11)
                    {
                        if (!_loc_9)
                        {
                            _loc_3 = false;
                            _loc_4 = _loc_6.itemInfo.name;
                            break;
                            continue;
                        }
                        _loc_12 = {};
                        _loc_12["putOnUid"] = _loc_9.uid;
                        _loc_12["getOffUid"] = _loc_10 == null ? ("") : (_loc_10.uid);
                        _loc_5.push(_loc_12);
                    }
                }
            }
            if (_loc_2)
            {
                MsgManager.showRollTipsMsg(Language.getString(35517));
                return;
            }
            if (!_loc_3)
            {
                _loc_13 = HTMLUtil.addColor(_loc_4, GlobalStyle.colorLv);
                MsgManager.showRollTipsMsg(Language.getStringByParam(35518, _loc_13));
                return;
            }
            for each (_loc_7 in _loc_5)
            {
                
                GameProxy.equip.dress(_loc_7["putOnUid"], _loc_7["getOffUid"]);
            }
            return;
        }// end function

        public static function getFashionNameByType(param1:int) : String
        {
            var _loc_2:String = null;
            switch(param1)
            {
                case EAdvanceComponentType._EAdvanceComponentTypeClothes:
                {
                    _loc_2 = Language.getString(41405);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWing:
                {
                    _loc_2 = Language.getString(41406);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWeapon:
                {
                    _loc_2 = Language.getString(41407);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightSoul:
                {
                    _loc_2 = Language.getString(41408);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightMethod:
                {
                    _loc_2 = Language.getString(41409);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeDragonSoul:
                {
                    _loc_2 = Language.getString(41410);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_2 = Language.getString(41411);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_2 = Language.getString(41412);
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_2 = Language.getString(41413);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getEquipFashionType(param1:ItemData) : int
        {
            var _loc_2:int = 0;
            switch(param1.itemInfo.category)
            {
                case EProp._EPropFashionClothesEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                    break;
                }
                case EProp._EPropFashionWingEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                    break;
                }
                case EProp._EPropFashionWeaponEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                    break;
                }
                case EProp._EPropFashionFightSoulEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                    break;
                }
                case EProp._EPropFashionFightMethodEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                    break;
                }
                case EProp._EPropFashionDragonSoulEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                    break;
                }
                case EProp._EPropFashionHolyBookEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                    break;
                }
                case EProp._EPropFashionWarShieldEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                    break;
                }
                case EProp._EPropFashionMonsterSoulEquip:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getSwfModelType() : ModelType
        {
            return ModelType.NormalSwf;
        }// end function

        public static function getGrowthGainAttr(param1:ItemData, param2:String, param3:int) : int
        {
            var _loc_4:int = 0;
            var _loc_5:String = null;
            var _loc_6:int = 0;
            var _loc_7:TEquipTarget = null;
            var _loc_8:int = 0;
            if (param1 && param1.itemInfo.category == EStuff._EStuffAdvance)
            {
                switch(param1.itemInfo.type)
                {
                    case EAdvanceType._EAdvanceTypeFashionClothesGrowth:
                    {
                        _loc_5 = "clothesgrowth";
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWingGrowth:
                    {
                        _loc_5 = "winggrowth";
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWeaponGrowth:
                    {
                        _loc_5 = "weapongrowth";
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightSoulGrowth:
                    {
                        _loc_5 = "growthone";
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightMethodGrowth:
                    {
                        _loc_5 = "growthtwo";
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionDragonSoulGrowth:
                    {
                        _loc_5 = "growththree";
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
                _loc_6 = param1.itemInfo.effectEx;
                _loc_7 = PlayerTargetConfig.instance.getInfoById(_loc_6);
                if (_loc_7)
                {
                    _loc_8 = _loc_7[param2] as int;
                    _loc_4 = _loc_8 * param3;
                }
            }
            return _loc_4;
        }// end function

        public static function getEquipNameByLookType(param1:int, param2:int) : String
        {
            var _loc_3:String = null;
            switch(param2)
            {
                case EEquipFashionClothes._EEquipFashionClothes1:
                {
                    break;
                }
                case EEquipFashionClothes._EEquipFashionClothes2:
                {
                    break;
                }
                case EEquipFashionClothes._EEquipFashionClothes3:
                {
                    break;
                }
                case EEquipFashionClothes._EEquipFashionClothes4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWing._EEquipFashionWing1:
                {
                    break;
                }
                case EEquipFashionWing._EEquipFashionWing2:
                {
                    break;
                }
                case EEquipFashionWing._EEquipFashionWing3:
                {
                    break;
                }
                case EEquipFashionWing._EEquipFashionWing4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            switch(param2)
            {
                case EEquipFashionWeapon._EEquipFashionWeapon1:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon2:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon3:
                {
                    break;
                }
                case EEquipFashionWeapon._EEquipFashionWeapon4:
                {
                    break;
                }
                default:
                {
                    break;
                }
            }
            if (param1 == ELookUpType._ELookUpTypeMonsterSoul)
            {
                switch(param2)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            return _loc_3;
        }// end function

        public static function getEquipName(param1:ItemData) : String
        {
            var _loc_2:String = null;
            if (param1.itemInfo.category == EProp._EPropFashionClothesEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionClothes._EEquipFashionClothes1:
                    {
                        _loc_2 = Language.getString(41450);
                        break;
                    }
                    case EEquipFashionClothes._EEquipFashionClothes2:
                    {
                        _loc_2 = Language.getString(41451);
                        break;
                    }
                    case EEquipFashionClothes._EEquipFashionClothes3:
                    {
                        _loc_2 = Language.getString(41452);
                        break;
                    }
                    case EEquipFashionClothes._EEquipFashionClothes4:
                    {
                        _loc_2 = Language.getString(41453);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionWingEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWing._EEquipFashionWing1:
                    {
                        _loc_2 = Language.getString(41454);
                        break;
                    }
                    case EEquipFashionWing._EEquipFashionWing2:
                    {
                        _loc_2 = Language.getString(41455);
                        break;
                    }
                    case EEquipFashionWing._EEquipFashionWing3:
                    {
                        _loc_2 = Language.getString(41456);
                        break;
                    }
                    case EEquipFashionWing._EEquipFashionWing4:
                    {
                        _loc_2 = Language.getString(41457);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionWeaponEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41458);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41459);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41460);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41461);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionFightSoulEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41462);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41463);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41464);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41465);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionFightMethodEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41466);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41467);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41468);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41469);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionDragonSoulEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41470);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41471);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41472);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41473);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionHolyBookEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41474);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41475);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41476);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41477);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionWarShieldEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41478);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41479);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41480);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41481);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (param1.itemInfo.category == EProp._EPropFashionMonsterSoulEquip)
            {
                switch(param1.itemInfo.type)
                {
                    case EEquipFashionWeapon._EEquipFashionWeapon1:
                    {
                        _loc_2 = Language.getString(41482);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon2:
                    {
                        _loc_2 = Language.getString(41483);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon3:
                    {
                        _loc_2 = Language.getString(41484);
                        break;
                    }
                    case EEquipFashionWeapon._EEquipFashionWeapon4:
                    {
                        _loc_2 = Language.getString(41485);
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            return _loc_2;
        }// end function

        public static function getFashionRecommendData(param1:int) : BestRecommendData
        {
            var _loc_3:BestRecommendData = null;
            var _loc_4:Date = null;
            var _loc_5:int = 0;
            var _loc_6:TMountConfig = null;
            var _loc_7:TMountConfig = null;
            var _loc_2:* = Cache.instance.fashion.getFashionInfo(param1);
            if (!isReachFashionOpenLevel(param1))
            {
                return null;
            }
            if (_loc_2 && _loc_2.advanceInfo && _loc_2.baseInfo && _loc_2.advanceInfo.code < FashionConst.FashionAdvanceMaxLevel)
            {
                _loc_4 = ClockManager.instance.nowDate;
                _loc_5 = Cache.instance.fashion.getFashionExpiredTime(param1) - _loc_4.time / 1000;
                _loc_6 = _loc_2.baseInfo;
                _loc_7 = MountConfig.instance.getFashionInfoByCode(param1, (_loc_2.advanceInfo.code + 1));
                if (_loc_6.blessClear == 1)
                {
                    if (_loc_2.advanceInfo.bless == 0 && isFashionCanAdvanceSucc(param1))
                    {
                        _loc_3 = new BestRecommendData();
                        _loc_3.recommendType = param1;
                        _loc_3.recommendName = _loc_7.name;
                        _loc_3.blessLeftTime = 0;
                    }
                    else if (_loc_2.advanceInfo.bless != 0)
                    {
                        _loc_3 = new BestRecommendData();
                        _loc_3.recommendType = param1;
                        _loc_3.recommendName = _loc_7.name;
                        _loc_3.blessLeftTime = _loc_5;
                    }
                }
                else if (_loc_6.blessClear == 0)
                {
                    if (_loc_2.advanceInfo.state < 0 && isFashionCanAdvanceSucc(param1, false))
                    {
                        _loc_3 = new BestRecommendData();
                        _loc_3.recommendType = param1;
                        _loc_3.recommendName = _loc_7.name;
                        _loc_3.isCanActive = true;
                    }
                    else if (_loc_2.advanceInfo.state >= 0 && isFashionCanAdvanceSucc(param1, false))
                    {
                        _loc_3 = new BestRecommendData();
                        _loc_3.recommendType = param1;
                        _loc_3.recommendName = _loc_7.name;
                    }
                }
            }
            return _loc_3;
        }// end function

        public static function isFashionCanAdvanceSucc(param1:int, param2:Boolean = true) : Boolean
        {
            var _loc_10:int = 0;
            var _loc_13:int = 0;
            var _loc_14:int = 0;
            var _loc_15:ItemData = null;
            var _loc_3:* = Cache.instance.fashion.getFashionInfo(param1);
            if (_loc_3.advanceInfo == null)
            {
                return false;
            }
            var _loc_4:* = _loc_3.baseInfo.advance;
            if (_loc_4 == null)
            {
                return false;
            }
            var _loc_5:* = _loc_4.split("&")[2];
            if (_loc_5 == null)
            {
                _loc_5 = _loc_4.split("&")[1];
            }
            var _loc_6:* = int(_loc_5.split("#")[0]);
            var _loc_7:* = _loc_3.advanceInfo.advanceNum;
            var _loc_8:* = _loc_3.advanceInfo.state < 0 ? (_loc_3.baseInfo.openPropNum) : (_loc_3.baseInfo.propNum);
            var _loc_9:* = (_loc_6 - _loc_7) * _loc_8;
            switch(param1)
            {
                case EAdvanceComponentType._EAdvanceComponentTypeClothes:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionClothesUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWing:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionWingUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWeapon:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionWeaponUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightSoul:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionFightSoulUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightMethod:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionFightMethodUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeDragonSoul:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionDragonSoulUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionHolyBookUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionWarShieldUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_10 = EAdvanceType._EAdvanceTypeFashionMonsterSoulUp;
                    break;
                }
                default:
                {
                    break;
                }
            }
            var _loc_11:* = Cache.instance.fashion.getFashionHideState(param1);
            if (_loc_11 >= 0)
            {
                _loc_15 = MountUtil.isHasBlessItem(_loc_10);
                if (_loc_15)
                {
                    return true;
                }
            }
            var _loc_12:* = Cache.instance.pack.backPackCache.getItemsByGroupCategoryAndType(EGroup._EGroupStuff, EStuff._EStuffAdvance, _loc_10);
            while (_loc_14 < _loc_12.length)
            {
                
                if (ItemsUtil.isPrescriOutTime(_loc_12[_loc_14] as ItemData))
                {
                }
                else if (_loc_3.baseInfo.code >= (_loc_12[_loc_14] as ItemData).itemInfo.effect)
                {
                    _loc_13 = _loc_13 + (_loc_12[_loc_14] as ItemData).itemAmount;
                }
                _loc_14++;
            }
            if (param2 && _loc_13 >= _loc_9)
            {
                return true;
            }
            if (!param2 && _loc_13 >= _loc_8)
            {
                return true;
            }
            return false;
        }// end function

        public static function isEquipAvailable(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            var _loc_3:* = FashionUtil.getEquipFashionType(param1);
            var _loc_4:* = GameDefConfig.instance.getSystemOpenLevel(_loc_3 + 65);
            var _loc_5:* = Cache.instance.role.entityInfo.level;
            var _loc_6:* = Cache.instance.fashion.getFashionInfo(_loc_3);
            var _loc_7:* = getFashionNameByType(_loc_3);
            if (_loc_5 >= _loc_4 && _loc_6.advanceInfo && _loc_6.advanceInfo.code >= param1.itemInfo.level)
            {
                _loc_2 = true;
            }
            else if (_loc_5 < _loc_4)
            {
                if (_loc_6.advanceInfo.state < 0)
                {
                    MsgManager.showRollTipsMsg(_loc_7 + _loc_4 + Language.getString(41486));
                    _loc_2 = false;
                }
                else
                {
                    _loc_2 = true;
                }
            }
            else
            {
                MsgManager.showRollTipsMsg(Language.getStringByParam(41487, _loc_7, param1.itemInfo.level));
                _loc_2 = false;
            }
            return _loc_2;
        }// end function

        public static function addArrow(param1:SWFPlayer, param2:DisplayObjectContainer, param3:int, param4:int) : void
        {
            param1.timeRate = 2;
            param1.scaleY = 0.8;
            param1.load("guideArrow.swf", ModelType.NormalSwf, null);
            param1.move(param3, param4);
            param2.addChild(param1);
            return;
        }// end function

        public static function removeArrow(param1:SWFPlayer) : void
        {
            DisplayUtil.removeMe(param1);
            return;
        }// end function

        public static function getFashionTypeByProp(param1:ItemData) : int
        {
            var _loc_2:int = 0;
            if (ItemsUtil.isGrowthStuff(param1))
            {
                switch(param1.itemInfo.type)
                {
                    case EAdvanceType._EAdvanceTypeFashionClothesGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWingGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWeaponGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightSoulGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightMethodGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionDragonSoulGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionHolyBookGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWarShieldGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionMonsterSoulGrowth:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            if (ItemsUtil.isTalentStuff(param1))
            {
                switch(param1.itemInfo.type)
                {
                    case EAdvanceType._EAdvanceTypeFashionClothesTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWingTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWeaponTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightSoulTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionFightMethodTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionDragonSoulTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionHolyBookTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionWarShieldTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                        break;
                    }
                    case EAdvanceType._EAdvanceTypeFashionMonsterSoulTalent:
                    {
                        _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                        break;
                    }
                    default:
                    {
                        break;
                    }
                }
            }
            return _loc_2;
        }// end function

        public static function isGrowthTalentAvailable(param1:ItemData) : Boolean
        {
            var _loc_2:Boolean = false;
            var _loc_3:int = 0;
            var _loc_4:String = null;
            var _loc_5:FashionAdvanceData = null;
            if (param1)
            {
                _loc_3 = getFashionTypeByProp(param1);
                _loc_4 = getFashionNameByType(_loc_3);
                _loc_5 = Cache.instance.fashion.getFashionInfo(_loc_3);
                if (_loc_5 && _loc_5.advanceInfo)
                {
                    if (ItemsUtil.isGrowthStuff(param1))
                    {
                        if (_loc_5.advanceInfo.code < 4)
                        {
                            _loc_2 = false;
                            MsgManager.showRollTipsMsg(_loc_4 + Language.getString(41488), MsgRollTipsType.msgRollTips3);
                        }
                        else
                        {
                            _loc_2 = true;
                        }
                    }
                    if (ItemsUtil.isTalentStuff(param1))
                    {
                        if (_loc_5.advanceInfo.code < 5)
                        {
                            _loc_2 = false;
                            MsgManager.showRollTipsMsg(_loc_4 + Language.getString(41489), MsgRollTipsType.msgRollTips3);
                        }
                        else
                        {
                            _loc_2 = true;
                        }
                    }
                }
            }
            return _loc_2;
        }// end function

        public static function getFashionTypeBySkillType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case ESkillCategory._EClothesSkill:
                {
                    _loc_2 = EFashionType._EFashionClothes;
                    break;
                }
                case ESkillCategory._EWingSkill:
                {
                    _loc_2 = EFashionType._EFashionWing;
                    break;
                }
                case ESkillCategory._EArtifactSkill:
                {
                    _loc_2 = EFashionType._EFashionWeapon;
                    break;
                }
                case ESkillCategory._EFightSoulSkill:
                {
                    _loc_2 = EFashionType._EFashionFightSoul;
                    break;
                }
                case ESkillCategory._EFightMethodSkill:
                {
                    _loc_2 = EFashionType._EFashionFightMethod;
                    break;
                }
                case ESkillCategory._EDragonSoulSkill:
                {
                    _loc_2 = EFashionType._EFashionDragonSoul;
                    break;
                }
                case ESkillCategory._EHolyBookSkill:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                    break;
                }
                case ESkillCategory._EWarShieldSkill:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                    break;
                }
                case ESkillCategory._EMonsterSoulSkill:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                    break;
                }
                case ESkillCategory._EMountSkill:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMount;
                    break;
                }
                case ESkillCategory._EPetSkill:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypePet;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getSkillTypeByFashionType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case EFashionType._EFashionClothes:
                {
                    _loc_2 = ESkillCategory._EClothesSkill;
                    break;
                }
                case EFashionType._EFashionWing:
                {
                    _loc_2 = ESkillCategory._EWingSkill;
                    break;
                }
                case EFashionType._EFashionWeapon:
                {
                    _loc_2 = ESkillCategory._EArtifactSkill;
                    break;
                }
                case EFashionType._EFashionFightSoul:
                {
                    _loc_2 = ESkillCategory._EFightSoulSkill;
                    break;
                }
                case EFashionType._EFashionFightMethod:
                {
                    _loc_2 = ESkillCategory._EFightMethodSkill;
                    break;
                }
                case EFashionType._EFashionDragonSoul:
                {
                    _loc_2 = ESkillCategory._EDragonSoulSkill;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_2 = ESkillCategory._EHolyBookSkill;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_2 = ESkillCategory._EWarShieldSkill;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_2 = ESkillCategory._EMonsterSoulSkill;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function isFashionSkill(param1:int) : Boolean
        {
            return param1 == ESkillCategory._EArtifactSkill || param1 == ESkillCategory._EClothesSkill || param1 == ESkillCategory._EWingSkill || param1 == ESkillCategory._EFightSoulSkill || param1 == ESkillCategory._EFightMethodSkill || param1 == ESkillCategory._EDragonSoulSkill || param1 == ESkillCategory._EHolyBookSkill || param1 == ESkillCategory._EWarShieldSkill || param1 == ESkillCategory._EMonsterSoulSkill;
        }// end function

        public static function getAllCodeDefaultSkills(param1:int) : HashMap
        {
            var _loc_4:TMountConfig = null;
            var _loc_2:* = MountConfig.instance.getFashionsByType(param1);
            _loc_2.sort(sortByCode);
            var _loc_3:* = new HashMap();
            for each (_loc_4 in _loc_2)
            {
                
                if (_loc_4.skillList)
                {
                    _loc_3.push(_loc_4.code, int(_loc_4.skillList));
                }
            }
            return _loc_3;
        }// end function

        private static function sortByCode(param1:TMountConfig, param2:TMountConfig) : int
        {
            if (param1.code < param2.code)
            {
                return -1;
            }
            if (param1.code > param2.code)
            {
                return 1;
            }
            return 0;
        }// end function

        public static function getAllLeardFashionSkills(param1:int) : Dictionary
        {
            var _loc_5:SkillInfo = null;
            var _loc_2:* = getSkillTypeByFashionType(param1);
            var _loc_3:* = SkillUtil.getLearnedSkillByType(_loc_2);
            var _loc_4:* = new Dictionary();
            for each (_loc_5 in _loc_3)
            {
                
                if (_loc_4[_loc_5.tSkill.posType] == null)
                {
                    _loc_4[_loc_5.tSkill.posType] = [];
                }
                _loc_4[_loc_5.tSkill.posType].push(_loc_5);
            }
            return _loc_4;
        }// end function

        public static function getLearnedMaxLevelSkill(param1:int, param2:int) : SkillInfo
        {
            var _loc_5:SkillInfo = null;
            var _loc_6:SkillInfo = null;
            var _loc_3:* = Cache.instance.fashion.fashionSkillDic[param1];
            var _loc_4:* = _loc_3[param2] as Array;
            if (_loc_4)
            {
                for each (_loc_6 in _loc_4)
                {
                    
                    if (_loc_5 == null)
                    {
                        _loc_5 = _loc_6;
                        continue;
                    }
                    if (_loc_5.tSkill.skillLevel < _loc_6.tSkill.skillLevel)
                    {
                        _loc_5 = _loc_6;
                    }
                }
            }
            return _loc_5;
        }// end function

        public static function getMaxLevelSkill(param1:Array) : SkillInfo
        {
            var _loc_2:SkillInfo = null;
            var _loc_3:SkillInfo = null;
            for each (_loc_3 in param1)
            {
                
                if (_loc_2 == null)
                {
                    _loc_2 = _loc_3;
                }
                if (_loc_2.skillLevel < _loc_3.skillLevel)
                {
                    _loc_2 = _loc_3;
                }
            }
            return _loc_2;
        }// end function

        public static function getSkillCombat(param1:int) : int
        {
            var _loc_2:int = 0;
            var _loc_4:String = null;
            var _loc_5:Array = null;
            var _loc_6:SkillInfo = null;
            var _loc_3:* = getAllLeardFashionSkills(param1);
            for (_loc_4 in _loc_3)
            {
                
                _loc_5 = _loc_3[_loc_4] as Array;
                _loc_6 = getMaxLevelSkill(_loc_5);
                if (_loc_6)
                {
                    _loc_2 = _loc_2 + _loc_6.tSkill.combat;
                }
            }
            return _loc_2;
        }// end function

        public static function isSkillBookAvailable(param1:ItemData) : Boolean
        {
            var _loc_5:int = 0;
            var _loc_6:int = 0;
            var _loc_7:int = 0;
            var _loc_8:FashionAdvanceData = null;
            var _loc_2:* = ItemsUtil.getSkillTypeByItemData(param1);
            var _loc_3:* = FashionUtil.getFashionTypeBySkillType(_loc_2);
            var _loc_4:* = getAllCodeDefaultSkills(_loc_3);
            for each (_loc_7 in _loc_4.keys)
            {
                
                if (getPosTypeBySkillId(int(_loc_4.getValue(_loc_7))) == getPosTypeBySkillId(param1.itemInfo.effect))
                {
                    _loc_6 = int(_loc_7);
                    break;
                }
            }
            _loc_8 = Cache.instance.fashion.getFashionInfo(_loc_3);
            if (_loc_8)
            {
                _loc_5 = _loc_8.advanceInfo.code;
            }
            if (_loc_5 != 0 && _loc_6 != 0 && _loc_5 >= _loc_6)
            {
                return true;
            }
            MsgManager.showRollTipsMsg(Language.getStringByParam(41490, FashionUtil.getFashionNameByType(_loc_3), _loc_6), MsgRollTipsType.msgRollTips3);
            return false;
        }// end function

        private static function getPosTypeBySkillId(param1:int) : int
        {
            var _loc_2:* = SkillConfig.instance.getInfoById(param1);
            if (_loc_2)
            {
                return _loc_2.posType;
            }
            return 0;
        }// end function

        public static function isActivePropEnough(param1:int) : Boolean
        {
            var _loc_3:int = 0;
            var _loc_2:* = Cache.instance.fashion.getFashionInfo(param1);
            var _loc_4:* = getPackAvailablePropNum(param1);
            if (_loc_2.baseInfo)
            {
                _loc_3 = _loc_2.baseInfo.openPropNum;
            }
            if (_loc_4 >= _loc_3)
            {
                return true;
            }
            return false;
        }// end function

        public static function getPackAvailablePropNum(param1:int) : int
        {
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_5:Array = null;
            var _loc_6:Array = null;
            var _loc_7:Array = null;
            var _loc_8:int = 0;
            var _loc_2:* = Cache.instance.fashion.getFashionInfo(param1);
            if (_loc_2.baseInfo)
            {
                _loc_4 = getAdvanceTypeByFashionType(param1);
                _loc_6 = Cache.instance.pack.backPackCache.getItemsByGroupCategoryAndType(EGroup._EGroupStuff, EStuff._EStuffAdvance, _loc_4);
                _loc_6.sort(ItemsUtil.sortItem);
                _loc_7 = Cache.instance.pack.backPackCache.getItemsByGroupCategoryAndType(EGroup._EGroupStuff, EStuff._EStuffAdvance, EAdvanceType._EAdvanceTypeAllRoundUp);
                _loc_7.sort(ItemsUtil.sortItem);
                _loc_5 = _loc_6.concat(_loc_7);
                while (_loc_8 < _loc_5.length)
                {
                    
                    if (ItemsUtil.isPrescriOutTime(_loc_5[_loc_8] as ItemData))
                    {
                    }
                    else if (_loc_2.baseInfo.code >= (_loc_5[_loc_8] as ItemData).itemInfo.effect)
                    {
                        _loc_3 = _loc_3 + (_loc_5[_loc_8] as ItemData).itemAmount;
                    }
                    _loc_8++;
                }
            }
            return _loc_3;
        }// end function

        public static function getAdvanceTypeByFashionType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case EAdvanceComponentType._EAdvanceComponentTypeClothes:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionClothesUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWing:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionWingUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWeapon:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionWeaponUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightSoul:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionFightSoulUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeFightMethod:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionFightMethodUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeDragonSoul:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionDragonSoulUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionHolyBookUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionWarShieldUp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_2 = EAdvanceType._EAdvanceTypeFashionMonsterSoulUp;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getFashionTypeByAdvanceType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case EAdvanceType._EAdvanceTypeFashionClothesUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeClothes;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionWingUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWing;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionWeaponUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWeapon;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionFightSoulUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightSoul;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionFightMethodUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeFightMethod;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionDragonSoulUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeDragonSoul;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionHolyBookUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeHolyBook;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionWarShieldUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeWarShield;
                    break;
                }
                case EAdvanceType._EAdvanceTypeFashionMonsterSoulUp:
                {
                    _loc_2 = EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function isFashionOpend(param1:int) : Boolean
        {
            var _loc_2:* = Cache.instance.fashion.getFashionInfo(param1);
            if (_loc_2 && _loc_2.advanceInfo)
            {
                if (_loc_2.advanceInfo.state >= 0)
                {
                    return true;
                }
            }
            return false;
        }// end function

        public static function isReachFashionOpenLevel(param1:int) : Boolean
        {
            var _loc_2:int = 0;
            var _loc_3:* = Cache.instance.role.entityInfo.level;
            switch(param1)
            {
                case EFashionType._EFashionClothes:
                {
                    _loc_2 = GameConst.ClothOpenLevel;
                    break;
                }
                case EFashionType._EFashionWing:
                {
                    _loc_2 = GameConst.WingOpenLevel;
                    break;
                }
                case EFashionType._EFashionWeapon:
                {
                    _loc_2 = GameConst.ArtifactOpenLevel;
                    break;
                }
                case EFashionType._EFashionFightSoul:
                {
                    _loc_2 = GameConst.FightSoulOpenLevel;
                    break;
                }
                case EFashionType._EFashionFightMethod:
                {
                    _loc_2 = GameConst.FightMethodOpenLevel;
                    break;
                }
                case EFashionType._EFashionDragonSoul:
                {
                    _loc_2 = GameConst.DragonSoulOpenLevel;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_2 = GameConst.HolyBookOpenLevel;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_2 = GameConst.WarShieldOpenLevel;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_2 = GameConst.MonsterSoulOpenLevel;
                    break;
                }
                default:
                {
                    break;
                }
            }
            if (_loc_3 >= _loc_2)
            {
                return true;
            }
            return false;
        }// end function

        public static function getFashionLevelRes(param1:int) : String
        {
            var _loc_2:String = null;
            switch(param1)
            {
                case 1:
                {
                    _loc_2 = ImagesConst.FashionLevel_One;
                    break;
                }
                case 2:
                {
                    _loc_2 = ImagesConst.FashionLevel_Two;
                    break;
                }
                case 3:
                {
                    _loc_2 = ImagesConst.FashionLevel_Three;
                    break;
                }
                case 4:
                {
                    _loc_2 = ImagesConst.FashionLevel_Four;
                    break;
                }
                case 5:
                {
                    _loc_2 = ImagesConst.FashionLevel_Five;
                    break;
                }
                case 6:
                {
                    _loc_2 = ImagesConst.FashionLevel_Six;
                    break;
                }
                case 7:
                {
                    _loc_2 = ImagesConst.FashionLevel_Seven;
                    break;
                }
                case 8:
                {
                    _loc_2 = ImagesConst.FashionLevel_Eight;
                    break;
                }
                case 9:
                {
                    _loc_2 = ImagesConst.FashionLevel_Nine;
                    break;
                }
                case 10:
                {
                    _loc_2 = ImagesConst.FashionLevel_Ten;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getPackPosTypeByEquip(param1:ItemData) : int
        {
            var _loc_2:int = 0;
            switch(param1.itemInfo.category)
            {
                case EProp._EPropFashionClothesEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 1;
                    break;
                }
                case EProp._EPropFashionWingEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 2;
                    break;
                }
                case EProp._EPropFashionWeaponEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 3;
                    break;
                }
                case EProp._EPropFashionFightSoulEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 4;
                    break;
                }
                case EProp._EPropFashionFightMethodEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 5;
                    break;
                }
                case EProp._EPropFashionDragonSoulEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 6;
                    break;
                }
                case EProp._EPropFashionHolyBookEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 7;
                    break;
                }
                case EProp._EPropFashionWarShieldEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 8;
                    break;
                }
                case EProp._EPropFashionMonsterSoulEquip:
                {
                    _loc_2 = EPlayerItemPosType._EPlayerItemPosTypeFashion + 9;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function getIsDoneTypeByFashionType(param1:int) : int
        {
            var _loc_2:int = 0;
            switch(param1)
            {
                case EFashionType._EFashionClothes:
                {
                    _loc_2 = IsDoneType.AutoBuyClothProp;
                    break;
                }
                case EFashionType._EFashionWing:
                {
                    _loc_2 = IsDoneType.AutoBuyWingProp;
                    break;
                }
                case EFashionType._EFashionWeapon:
                {
                    _loc_2 = IsDoneType.AutoBuyArtifactProp;
                    break;
                }
                case EFashionType._EFashionFightSoul:
                {
                    _loc_2 = IsDoneType.AutoBuyFightSoulProp;
                    break;
                }
                case EFashionType._EFashionFightMethod:
                {
                    _loc_2 = IsDoneType.AutoBuyFightMethodProp;
                    break;
                }
                case EFashionType._EFashionDragonSoul:
                {
                    _loc_2 = IsDoneType.AutoBuyDragonSoulProp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeHolyBook:
                {
                    _loc_2 = IsDoneType.AutoBuyHolyBookProp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeWarShield:
                {
                    _loc_2 = IsDoneType.AutoBuyWarShieldProp;
                    break;
                }
                case EAdvanceComponentType._EAdvanceComponentTypeMonsterSoul:
                {
                    _loc_2 = IsDoneType.AutoBuyMonsterSoulProp;
                    break;
                }
                default:
                {
                    break;
                }
            }
            return _loc_2;
        }// end function

        public static function isNeedReturnFashion(param1:int) : Boolean
        {
            var _loc_2:* = MountConfig.instance.getFashionInfoByCode(param1, 3);
            if (_loc_2 && _loc_2.returnAdvanceNum)
            {
                return true;
            }
            return false;
        }// end function

        public static function isNeedActiveFashion(param1:int) : Boolean
        {
            var _loc_2:* = MountConfig.instance.getFashionInfoByCode(param1, 1);
            if (_loc_2 && _loc_2.openPropNum > 0)
            {
                return true;
            }
            return false;
        }// end function

    }
}
